// 排序分类组件
import React, { Component } from 'react';
import classNames from 'classnames';

class Tabs extends Component {
  render() {
    return (
      // 排序tab
      <div className="tabs-order">
        {this.props.tabs.map((item) => (
          <div
            key={item.id}
            onClick={() => this.props.changeTab(item.type)}
            className={classNames({ on: item.type === this.props.active })}
          >
            按{item.name}排序
          </div>
        ))}
      </div>
    );
  }
}

export default Tabs;
